package scjp.preparation.local;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

public class LocalizedHello {

	/**
	 * @param args
	 */
	public static void main(String args[]) {
//		Locale.setDefault(Locale.ITALY);
//		Locale currentLocale = Locale.getDefault();
		Locale currentLocale = new Locale("it", "IT");
		ResourceBundle resBundle =
		ResourceBundle.getBundle("ResourceBundle", currentLocale);
		System.out.printf(resBundle.getString("Greeting"));
		
		Locale locale1 = new Locale("en"); //#1
		Locale locale2 = new Locale("en", "in"); //#2
		Locale locale3 = new Locale("th", "TH", "TH"); //#3
		System.out.println(locale1 + " " + locale2 + " " + locale3 );
		
		Locale locale = new Locale("GJGJ", "pandora", "SpeCial"); //#1
		System.out.println(locale);
		
		String dateFormat = "d , m, K , '('E')' M, YYYY";
		// assume today's date is October 28th 2012
		System.out.printf("%s", new SimpleDateFormat(dateFormat).format(new Date()));

	}
}
